package com.orphan.marketFront.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.orphan.marketFront.mapper.UserMapper;
import com.orphan.marketFront.po.User;
import com.orphan.marketFront.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 快速注册的用户的数据表 服务实现类
 * </p>
 *
 * @author lucangtian
 * @since 2021-07-12
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    @Autowired
    public UserMapper userMapper;

    public User selectByName(String userName){
        return userMapper.getUserByName(userName);
    }

    //注册
    public int insert(User user){
        return userMapper.addUser(user);
    }

    @Override
    public String getUserNameById(Long id) {
        return userMapper.getUserNameById(id);
    }
}
